package com.chagee.store.operation.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 评价项类型
 *
 * @Author : hk
 * @Date : 2024/7/8
 */
@Getter
@AllArgsConstructor
public enum CommentTypeEnum {

	SCORE("score", "评分"),
	SINGLE_CHOICE("single_choice", "单选"),
	MULTIPLE_CHOICE("multiple_choice", "多选"),
	TEXT("text", "文本内容"),
	;
	private final String type;
	private final String desc;


	public static CommentTypeEnum queryByType(String type) {
		for (CommentTypeEnum value : values()) {
			if (Objects.equals(type, value.getType())) {
				return value;
			}
		}
		return null;
	}
}
